<?php
function __autoload($class_name)
{
	$src_dir = dirname(__FILE__) . '/../';
	if($class_name == 'Common')
	{
		require $src_dir . 'common/' . $class_name . '.php';
		return TRUE;
	}
	if($class_name == 'ConfigParser')
	{
		require $src_dir . 'common/' . $class_name . '.php';
		return TRUE;
	}
	if($class_name == 'DbCrud')
	{
		require $src_dir . 'model/dao/db/include/' . $class_name . '.php';
		return TRUE;
	}
	if($class_name == 'MysqliEngine')
	{
		require $src_dir . 'model/dao/db/include/' . $class_name . '.php';
		return TRUE;
	}
	if(0 < preg_match('/Model$/', $class_name))
	{
		require $src_dir . 'model/' . $class_name . '.php';
		return TRUE;
	}
	if(0 < preg_match('/Db$/', $class_name))
	{
		require $src_dir . 'model/dao/db/' . $class_name . '.php';
		return TRUE;
	}
}
?>